package dq.study.designmodel.state;

/**
 * @author dongqun
 * @version 1.0.0
 * @since 2021/05/10 10:38:00
 */
public class SpecialState2 implements State {
    @Override
    public void method() {
        if (this.value.equals("state2"))
            System.out.println("execute the second opt!");
        throw new RuntimeException("illegal state");
    }

    private String value;

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public void setValue(String value) {
        this.value = value;
    }
}
